.mc |
.\" @(#)mcplay.1	1.7 10/22/86 
.TH MCPLAY 1\-SPS 10/22/86
.mc
.ds ]W "Entropic Processing, Inc.
.SH NAME
mcplay - send portions of an SPS file to the MASSCOMP EF-12M digital-to
analog converter.
.SH SYNOPSIS
.B mcplay
[
.BI \-x " debug-level"
] [
.BI \-{psf} " range"
] [
.BI \-g " gain"
] [
.BI \-w " width"
] [
.BI \-r " nrepeat"
] [
.BI \-c " channel"
] [
.BI \-k " clock"
] [ 
.BI \-i 
] [
.BI \-h " hist-file"
] [
.BI \-b " shift-value"
]
.I file
[
.I more-files
]
.SH DESCRIPTION
.PP
.I Mcplay
sends a portion of one or more SPS sampled data files
to the MASSCOMP EF-12M digital-to-analog converter.
A subrange of data within the files may be chosen; this subrange may be specified in
seconds, frames, or points. Furthermore, a repeat count, a scaling factor
(gain), shift factor, and an alternate channel number may be
specified.
.PP
The following options are supported:
.TP
.BI \-x " debug"
Only debug level 1 is defined in this version.   This causes several
messages to be printed as internal processing proceeds.   The default
is level 0, which causes no debug output.
.TP
.BI \-p " range"
Select a subrange of points to be played, using the format
.I start\-end
or
.IR start:end .
Either the start or the end may be omitted; the beginning or the end of the
file are used if no alternate is specified. 
.IP
If multiple files were specified, the same range from each file is played.
.TP
.BI \-s " range"
Select a subrange of speech, specified in seconds. For compatibility with
DSC LISTEN, the beginning of the file is 0.
.TP
.BI \-f " range"
Select a subrange of speech, specified in frames. By default, a frame is
100 points, but this may be changed.
.TP
.BI \-w " width"
This switch defines the frame width. The width is ignored unless the
.B \-f
switch is also specified.
.TP
.BI \-r " count"
Repeat count. The selected speech is played
.I count
times. If multiple files were specified, the files are played in order, and
the order is repeated
.I count
times.
.TP
.BI \-c " channel"
Specifies an alternate channel number (default zero).
.TP
.BI \-k " clock"
Specifies an alternate clock (default zero).
.TP
.BI \-g " gain"
Speech samples are multiplied by
.I gain
before playback.  Gain is a real.
This overrides the automatic gain control described below.
.TP
.BI \-i 
If this flag is given and \fImax_value\fR is zero, 
then any samples with a value greater than
the maximum of the D/A converter will be clipped.   If clipping
occurs, then an entry is made in a history file for each
sampled clipped.  This entry gives the sample number and the  value before
clipping.   At the end of the file a scale factor is given that will
prevent clipping. 
Use of this option, slows things down noticeably.
.TP
.BI \-h " hist-file"
Specifies an alternate history file.  The default is \fImcplay.his\fR.
.TP
.BI \-b " shift-value"
If this option is given and \fIshift-value\fR is positive, then each
sample (after it is converted to integer format) is shifted to the right
by \fIshift-value\fR bits.   \fIShift-value\fR being negative causes a
left shift.   This option is useful to rescale data that has a higher
resolution than the D/A converter being used here.   For example, files
recorded by or synthesized from data recorded by a 16 bit A/D can be
shifted 4 bits to the right for correct output on a 12 bit D/A.    This
is preferred to using the \fB-g\fR option with a gain of .0625 because
the shift is faster than a floating multiply.   This difference is most
noticeable on large files.
.PP
If the SPS SD file header item \fImax_value\fR is greater than
the maximum value that the D/A converter can convert
(\s-1MAX_VALUE\s+1), then each sample
is multiplied by \s-1MAX_VALUE\s+1/\fImax_value\fR.
The effect is to scale the data so that the sample with the maximum
value is scaled to \s-1MAX_VALUE\s+1.
.PP
Playback may be aborted by 
sending the terminal's interrupt character (normally control-C)
after playback has started. 
.PP
If any of the command line range options are given, they
override the \fIstart\fR and \fInan\fR common file values described
below.
.SH SPS COMMON
The following items are read from the SPS Common file:
.IP
.I "start - integer"
.IP
This is the starting point in the sampled data file to begin
playing. 
.sp
.I "nan - integer"
.IP
This is the number of points (starting at start) to play.
.sp
.I "filename - string"
.IP
This is the name of the file to be played if \fIfile\fP is omitted
from the command line.
.PP
The following items are written into the SPS Common file:
.IP
.I "start - integer"
.IP
The starting point in the file that was played.
.sp
.I "nan - integer"
.IP
The number of points in the selected range.
.sp
.I "prog - string"
.IP
This is the name of the program (\fImcplay\fP in this case).
.sp
.I "filename - string"
.IP
This is the name of the file that was played.  If more than filename is
given on the command line, then this is the name of the first file
processed.
.SH DIAGNOSTICS
.PP
.I Mcplay
informs the user if the input file does not exist, or is not an SPS sampled
data file, or if inconsistent options are used.
.PP
The converter will timeout if the incorrect clock is connected.
.mc |
.PP
If the starting point requested is greater than the last point in the
file, then a message is printed and the program exits with status 1.  If
the ending point requested is greater than the last point in the file,
it is reset to the last point, a warning is printed and processing
continues.
.mc
.SH FILES
.SH BUGS
.SH EXPECTED CHANGES
.PP
.SH AUTHOR
.PP
Alan Parker, based on the Cupertino network play program by Joe Buck.
